{% extends "index.twig" %}
{% block content %}
{% set tstring = url_param('q','string') %}
{% set count = tag_count[tstring] %}
{% if not tstring %}
    <h4>No tags provided.</h4>
{% elseif count == 1 %}
    <h4>1 post is tagged "{{tstring}}"</h4>
{% else %}
    <h4>{{ count }} posts are tagged "{{tstring}}"</h4>
{% endif %}
{% set paging_url_base = current_page.url ~ '?q=' ~ tstring ~ '&' %}
{% set paging_array = {} %}
{% for page_id in tag_pages[tstring]|slice(1)|split('#') %}
    {% set paging_array = paging_array|merge([pages[page_id]]) %}
{% endfor %}
{% include 'includes/paging.twig' %}
{% endblock content %}
